/*
 * @Author: shanghongyun 2879455630@qq.com
 * @Date: 2025-05-28 13:29:54
 * @LastEditors: shanghongyun 2879455630@qq.com
 * @LastEditTime: 2025-06-11 14:36:10
 * @FilePath: \A05\Dev\systick.h
 * @Description: systick 头文件
 */

#ifndef __SYSTICK_H
#define __SYSTICK_H


#include "Base.h"

#define SYS_Frequency       (48000000UL)        /*系统时钟*/
#define SYSTICK_FREQUE      (1000)              /*滴答定时器频率*/


#define MS_TO_TICK(ms)      ((ms) * (SYSTICK_FREQUE / 1000))

#define _1MS_TICK           MS_TO_TICK(1)
#define _10MS_TICK          MS_TO_TICK(10)
#define _100MS_TICK         MS_TO_TICK(100)
#define _1S_TICK            MS_TO_TICK(1000)
#define _1min_TICK          MS_TO_TICK(60000)


void Systick_Init(void);
uint32_t Get_system_Timestamp(void);
uint32_t Get_Time_gap(uint32_t start_tick, uint32_t end_tick);


extern uint32_t gCurrent_tick;


#endif
